#ifndef SPATIALPARTITIONINGFACTORY_H_
#define SPATIALPARTITIONINGFACTORY_H_

#include "common.h"

#include "SpatialPartitioning.h"
#include "../include/SpatialPartitioningConfig.h"
#include "../include/SpatialPartitioningType.h"
#include "utils/Singleton.h"
#include "math/math.h"

namespace physicsworks {

using math::vec3;

class SpatialPartitioningFactory : public Singleton<SpatialPartitioningFactory> {
	friend class Singleton<SpatialPartitioningFactory>;
	
public:
	using Singleton<SpatialPartitioningFactory>::instance;
	
	SpatialPartitioning* instance(SpatialPartitioningType s, const SpatialPartitioningConfig& sc,
	                              const vec3& a, const vec3& b);

private:
	SpatialPartitioningFactory() {}
	~SpatialPartitioningFactory();
	SpatialPartitioningFactory(const SpatialPartitioningFactory&);
	SpatialPartitioningFactory& operator = (const SpatialPartitioningFactory&);
};

}

#endif /*SPATIALPARTITIONINGFACTORY_H_*/
